package config

import "card/pkg/config"

func init() {
	config.Add("mail", func() map[string]interface{} {
		return map[string]interface{}{
			// 默认是 Mailhog 的配置
			"smtp": map[string]interface{}{
				"host":       config.Env("mail.host", "localhost"),
				"port":       config.Env("mail.port", 1025),
				"username":   config.Env("mail.username", ""),
				"password":   config.Env("mail.password", ""),
				"encryption": config.Env("mail.encryption", ""),
			},

			"from": map[string]interface{}{
				"address": config.Env("mail.from_address", "gohub@example.com"),
				"name":    config.Env("mail.from_name", "Gohub"),
			},
		}
	})
}
